#pragma once

#include "CRT.h"
#include "ISpace.h"
#include "STLInclude.h"

class TraceResult: public ITraceResult
{
public: 
	TraceResult();
	virtual ~TraceResult();

	virtual bool HitAny() const;
	virtual size_t NumberOfHits() const;
	virtual const TSceneIntersection* GetHit(size_t index) const;

	virtual size_t NumberOfRayAABBTesting() const;
	virtual size_t NumberOfRayTriangleTesting() const;

	virtual void Reset();

	virtual void AddHit(const TSceneIntersection& hit, TraceType traceType);
	virtual void AddRayTriangleTesting();
	virtual void AddRayAABBTesting();

	virtual bool CanStopTrace() const;

protected:
	vector<TSceneIntersection> mHits;
	size_t mNumberOfRayTriangleTesting;
	size_t mNumberOfRayAABBTesting;
	bool mbCanStopTrace;
};
